package com.aoip.telemetry.telemetry.entity.order;

import com.aoip.telemetry.telemetry.entity.equipment.StInfoConfigEntity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author chenbai
 * @version 1.0
 * @date 2022/2/22 16:37
 */
@Data
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("order_base")
@ApiModel(description = "指令基本信息表")
public class OrderBaseEntity implements Serializable {

    private static final long serialVersionUID = -4414324080188895500L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty("数据id")
    private String id;

    @TableField(value = "order_name")
    @ApiModelProperty("指令名称")
    private String orderName;

    @TableField(value = "order_desc")
    @ApiModelProperty("指令描述")
    private String orderDesc;

    @TableField(value = "msg_format_type")
    @ApiModelProperty("报文格式类型（hex编码格式、ASCII编码格式）")
    private String msgFormatType;

    @TableField(value = "order_file_id")
    @ApiModelProperty("指令说明文档文件编码")
    private String orderFileId;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("修改时间")
    private LocalDateTime modifyTime;

    @TableField(value = "del_flag", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("删除标识")
    @TableLogic
    private Integer delFlag;

    @TableField(value = "bz")
    @ApiModelProperty("备注信息")
    private String bz;

    @TableField(value = "elementEntity", exist = false)
    @ApiModelProperty("指令要素关联关系信息")
    private List<RelOrderElementEntity> elementEntityList;

    @TableField(value = "orderStEntityList", exist = false)
    @ApiModelProperty("指令与测站关联关系信息")
    private List<RelOrderStEntity> orderStEntityList;

}
